package com.jk.dao;

import com.jk.pojo.UserBean;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface LogDao {
    @Select("SELECT * FROM `user_ljt` WHERE `name`=#{name}")
    UserBean findUserId(@Param("name") String name);
    @Insert("INSERT INTO `user_ljt` VALUES(null,#{name},#{password},#{port},#{portName},#{shoudIp},#{role})")
    void addUser(UserBean w);
    @Select("SELECT * FROM `user_ljt`")
    List<UserBean> selectAdmin();
}
